home *** CD-ROM | disk | FTP | other *** search
/ MacAddict 108 / MacAddict108.iso / Software / Internet & Communication / WordPress 1.5.1.dmg / wordpress / wp-content / themes / default / comments-popup.php < prev    next >
Encoding:
PHP Script  |  2005-02-28  |  4.8 KB  |  114 lines

  1. <?php 
  2. /* Don't remove these lines. */
  3. add_filter('comment_text', 'popuplinks');
  4. foreach ($posts as $post) { start_wp();
  5. ?>
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9.      <title><?php echo get_settings('blogname'); ?> - Comments on <?php the_title(); ?></title>
  10.  
  11.     <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_settings('blog_charset'); ?>" />
  12.     <style type="text/css" media="screen">
  13.         @import url( <?php bloginfo('stylesheet_url'); ?> );
  14.         body { margin: 3px; }
  15.     </style>
  16.  
  17. </head>
  18. <body id="commentspopup">
  19.  
  20. <h1 id="header"><a href="" title="<?php echo get_settings('blogname'); ?>"><?php echo get_settings('blogname'); ?></a></h1>
  21.  
  22. <h2 id="comments">Comments</h2>
  23.  
  24. <p><a href="<?php echo get_settings('siteurl'); ?>/wp-commentsrss2.php?p=<?php echo $post->ID; ?>"><abbr title="Really Simple Syndication">RSS</abbr> feed for comments on this post.</a></p>
  25.  
  26. <?php if ('open' == $post->ping_status) { ?>
  27. <p>The <acronym title="Uniform Resource Identifier">URI</acronym> to TrackBack this entry is: <em><?php trackback_url() ?></em></p>
  28. <?php } ?>
  29.  
  30. <?php
  31. // this line is WordPress' motor, do not delete it.
  32. $comment_author = (isset($_COOKIE['comment_author_' . COOKIEHASH])) ? trim($_COOKIE['comment_author_'. COOKIEHASH]) : '';
  33. $comment_author_email = (isset($_COOKIE['comment_author_email_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_email_'. COOKIEHASH]) : '';
  34. $comment_author_url = (isset($_COOKIE['comment_author_url_'. COOKIEHASH])) ? trim($_COOKIE['comment_author_url_'. COOKIEHASH]) : '';
  35. $comments = $wpdb->get_results("SELECT * FROM $wpdb->comments WHERE comment_post_ID = $id AND comment_approved = '1' ORDER BY comment_date");
  36. $commentstatus = $wpdb->get_row("SELECT comment_status, post_password FROM $wpdb->posts WHERE ID = $id");
  37. if (!empty($commentstatus->post_password) && $_COOKIE['wp-postpass_'. COOKIEHASH] != $commentstatus->post_password) {  // and it doesn't match the cookie
  38.     echo(get_the_password_form());
  39. } else { ?>
  40.  
  41. <?php if ($comments) { ?>
  42. <ol id="commentlist">
  43. <?php foreach ($comments as $comment) { ?>
  44.     <li id="comment-<?php comment_ID() ?>">
  45.     <?php comment_text() ?>
  46.     <p><cite><?php comment_type('Comment', 'Trackback', 'Pingback'); ?> by <?php comment_author_link() ?> — <?php comment_date() ?> @ <a href="#comment-<?php comment_ID() ?>"><?php comment_time() ?></a></cite></p>
  47.     </li>
  48.  
  49. <?php } // end for each comment ?>
  50. </ol>
  51. <?php } else { // this is displayed if there are no comments so far ?>
  52.     <p>No comments yet.</p>
  53. <?php } ?>
  54.  
  55. <?php if ('open' == $commentstatus->comment_status) { ?>
  56. <h2>Leave a comment</h2>
  57. <p>Line and paragraph breaks automatic, e-mail address never displayed, <acronym title="Hypertext Markup Language">HTML</acronym> allowed: <code><?php echo allowed_tags(); ?></code></p>
  58.  
  59. <form action="<?php echo get_settings('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
  60.     <p>
  61.       <input type="text" name="author" id="author" class="textarea" value="<?php echo $comment_author; ?>" size="28" tabindex="1" />
  62.        <label for="author">Name</label>
  63.     <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
  64.     <input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($_SERVER["REQUEST_URI"]); ?>" />
  65.     </p>
  66.  
  67.     <p>
  68.       <input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="28" tabindex="2" />
  69.        <label for="email">E-mail</label>
  70.     </p>
  71.  
  72.     <p>
  73.       <input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="28" tabindex="3" />
  74.        <label for="url"><acronym title="Uniform Resource Identifier">URI</acronym></label>
  75.     </p>
  76.  
  77.     <p>
  78.       <label for="comment">Your Comment</label>
  79.     <br />
  80.       <textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea>
  81.     </p>
  82.  
  83.     <p>
  84.       <input name="submit" type="submit" tabindex="5" value="Say It!" />
  85.     </p>
  86.     <?php do_action('comment_form', $post->ID); ?>
  87. </form>
  88. <?php } else { // comments are closed ?>
  89. <p>Sorry, the comment form is closed at this time.</p>
  90. <?php }
  91. } // end password check
  92. ?>
  93.  
  94. <div><strong><a href="javascript:window.close()">Close this window.</a></strong></div>
  95.  
  96. <?php // if you delete this the sky will fall on your head
  97. }
  98. ?>
  99.  
  100. <!-- // this is just the end of the motor - don't touch that line either :) -->
  101. <?php //} ?> 
  102. <p class="credit"><?php timer_stop(1); ?> <cite>Powered by <a href="http://wordpress.org" title="Powered by WordPress, state-of-the-art semantic personal publishing platform"><strong>Wordpress</strong></a></cite></p>
  103. <?php // Seen at http://www.mijnkopthee.nl/log2/archive/2003/05/28/esc(18) ?>
  104. <script type="text/javascript">
  105. <!--
  106. document.onkeypress = function esc(e) {    
  107.     if(typeof(e) == "undefined") { e=event; }
  108.     if (e.keyCode == 27) { self.close(); }
  109. }
  110. // -->
  111. </script>
  112. </body>
  113. </html>
  114.